<template>
  <div class="app-container">
    <!-- 基本信息 -->
    <div  class="box">
      <span class="l_title">基本信息</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">姓名：{{base.name}}</el-col>
        <el-col :span="6">身份证号码：{{base.ident_number}}</el-col>
        <el-col :span="6">电话：{{base.phone}}</el-col> 
        <el-col :span="6">年龄：{{base.age}}</el-col>
        <el-col :span="12" class="mgtop">身份证所属地：{{base.ident_number_address}}</el-col>
        <el-col :span="12" class="mgtop">电话所属地：{{base.phone_address}}</el-col> 
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 重点人员 -->
    <div  class="box">
      <span class="l_title">重点人员</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="12">重点人员名单：
          <span v-if="person=='A'">未命中重点人</span>
          <span v-if="person=='B'">命中正常⼈</span>
          <span v-if="person=='C'" style="color:red">命中前科</span>
          <span v-if="person=='D'" style="color:red">命中涉毒</span>
          <span v-if="person=='E'" style="color:red">命中吸毒</span>
          <span v-if="person=='F'" style="color:red">命中在逃</span>
        </el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 运营商三要素 -->
    <div  class="box">
      <span class="l_title">运营商认证三要素</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="12" v-if="triple!=null">运营商认证三要素：
          <span v-if="triple.result_code&&triple.result_code=='01'" style="color:red">{{triple.result_code_desc}}</span>
          <span v-if="triple.result_code&&triple.result_code=='02'">{{triple.result_code_desc}}</span>
        </el-col>
      </el-row>
    </div>

    <el-divider></el-divider>
    <!-- 系统结论 -->
    <div  class="box">
      <span class="l_title">系统结论</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">综合评分：{{detail.score_norm_explain}}</el-col>
        <el-col :span="6">审核建议：{{detail.verify_recomment}}</el-col>
        <el-col :span="24" class="mgtop">分值标注说明:分值在200⾄700之间,得分越低，⻛险越⾼:640分以上,建议通过;640⾄560分,建议审核;560分以下,建议拒绝</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 法院风险信息 -->
    <div  class="box" v-if="court_risk_info_list!=''">
      <span class="l_title">法院风险信息</span>
      <el-row  class="infolist infolist_top red" v-for="(item,index) in court_risk_info_list">
        <el-col :span="6">类型：{{item.data_type}}</el-col>
        <el-col :span="6">审结日期：{{item.sort_time_string}}</el-col>
        <el-col :span="6">匹配度：{{item.compatibility}}</el-col>
        <el-col :span="6" class="mgtop">摘要说明：{{item.summary}}</el-col>
      </el-row>
    </div>
    <el-divider v-if="court_risk_info_list!=''"></el-divider>
     <!-- 风险名单检测 -->
    <div  class="box">
      <span class="l_title">风险名单检测</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6" :class="textcolor(risk_list_check.census_register_high_risk_area,1)">归属地位于高风险集中地区：{{risk_list_check.census_register_high_risk_area}}</el-col>
        <el-col :span="6" :class="textcolor(risk_list_check.idcard_hit_clzlwy,1)">车辆租赁违约名单：{{risk_list_check.idcard_hit_clzlwy}}</el-col>
        <el-col :span="6" :class="textcolor(risk_list_check.idcard_hit_fysx,1)">法院失信名单：{{risk_list_check.idcard_hit_fysx}}</el-col>
        <el-col :span="6" :class="textcolor(risk_list_check.idcard_hit_fyja,1)">法院结案名单：{{risk_list_check.idcard_hit_fyja}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_fyzx,1)">法院执行名单：{{risk_list_check.idcard_hit_fyzx}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_xdyq,1)">信贷逾期名单：{{risk_list_check.idcard_hit_xdyq}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_fztj,1)">犯罪通缉名单：{{risk_list_check.idcard_hit_fztj}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_gfxgz,1)">高风险关注名单：{{risk_list_check.idcard_hit_gfxgz}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_qsgsfrdb,1)">欠税公司法人代表名：{{risk_list_check.idcard_hit_qsgsfrdb}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_qs,1)">欠税名单：{{risk_list_check.idcard_hit_qs}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.result_xd,1)">特殊关注名单：{{risk_list_check.result_xd}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_gywzcc,1)">故意违章乘车名单：{{risk_list_check.idcard_hit_gywzcc}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.phone_hit_txxh,1)">通信小号库：{{risk_list_check.phone_hit_txxh}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.idcard_hit_zxdkqf,1)">助学贷款欠费历史：{{risk_list_check.idcard_hit_zxdkqf}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(risk_list_check.phone_hit_xjhm,1)">虚拟号码库：{{risk_list_check.phone_hit_xjhm}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 7天内申请人在平台申请借款数 -->
    <div  class="box">
      <span class="l_title">7天内申请人在平台申请借款数</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">一般消费分期平台：{{personal_loan_demand.d7_apply_setup_time_ybxffq}}</el-col>
        <el-col :span="6">信用卡：{{personal_loan_demand.d7_apply_setup_time_xyk}}</el-col>
        <el-col :span="6">大型消费金融公司：{{personal_loan_demand.d7_apply_setup_time_dxxfjr}}</el-col>
        <el-col :span="6">其它类型贷款公司：{{personal_loan_demand.d7_apply_setup_time_other}}</el-col>
        <el-col :span="6" class="mgtop">P2P平台：{{personal_loan_demand.d7_apply_setup_time_p2pwd}}</el-col>
        <el-col :span="6" class="mgtop">小额贷款公司：{{personal_loan_demand.d7_apply_setup_time_xedkgs}}</el-col>
        <el-col :span="6" class="mgtop">贷款需求总数：{{personal_loan_demand.d7_apply_setup_time}}</el-col>

      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 一个月内申请人在平台申请借款数 -->
    <div  class="box">
      <span class="l_title">一个月内申请人在平台申请借款数</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">一般消费分期平台：{{personal_loan_demand.m1_apply_setup_time_ybxffq}}</el-col>
        <el-col :span="6">信用卡：{{personal_loan_demand.m1_apply_setup_time_xyk}}</el-col>
        <el-col :span="6">大型消费金融公司：{{personal_loan_demand.m1_apply_setup_time_dxxfjr}}</el-col>
        <el-col :span="6">其它类型贷款公司：{{personal_loan_demand.m1_apply_setup_time_other}}</el-col>
        <el-col :span="6" class="mgtop">P2P平台：{{personal_loan_demand.m1_apply_setup_time_p2pwd}}</el-col>
        <el-col :span="6" class="mgtop">小额贷款公司：{{personal_loan_demand.m1_apply_setup_time_xedkgs}}</el-col>
        <el-col :span="6" class="mgtop">贷款需求总数：{{personal_loan_demand.m1_apply_setup_time}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 三个月内申请人在平台申请借款数 -->
    <div  class="box">
      <span class="l_title">三个月内申请人在平台申请借款数</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">一般消费分期平台：{{personal_loan_demand.m3_apply_setup_time_ybxffq}}</el-col>
        <el-col :span="6">信用卡：{{personal_loan_demand.m3_apply_setup_time_xyk}}</el-col>
        <el-col :span="6">大型消费金融公司：{{personal_loan_demand.m3_apply_setup_time_dxxfjr}}</el-col>
        <el-col :span="6">其它类型贷款公司：{{personal_loan_demand.m3_apply_setup_time_other}}</el-col>
        <el-col :span="6" class="mgtop">P2P平台：{{personal_loan_demand.m3_apply_setup_time_p2pwd}}</el-col>
        <el-col :span="6" class="mgtop">小额贷款公司：{{personal_loan_demand.m3_apply_setup_time_xedkgs}}</el-col>
        <el-col :span="6" class="mgtop">贷款需求总数：{{personal_loan_demand.m3_apply_setup_time}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
     <!-- 贷款放贷信息 -->
    <div  class="box">
      <span class="l_title">贷款放贷信息</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">消费分期类放款机构数：{{personal_loan_f.cflenders}}</el-col>
        <el-col :span="6">最近一次距今天数：{{personal_loan_f.distance_now_days}}</el-col>
        <el-col :span="6">近1个月放款次数：{{personal_loan_f.lend_number1}}</el-col>
        <el-col :span="6">近3个月放款次数：{{personal_loan_f.lend_number3}}</el-col>
        <el-col :span="6" class="mgtop">近6个月放款次数：{{personal_loan_f.lend_number6}}</el-col>
        <el-col :span="6" class="mgtop">最近一次贷款时间：{{personal_loan_f.lend_time}}</el-col>
        <el-col :span="6" class="mgtop">近12个月放款机构总数：{{personal_loan_f.lenders}}</el-col>
        <el-col :span="6" class="mgtop">贷款时长：{{personal_loan_f.loanday}}</el-col>
        <el-col :span="6" class="mgtop">网络贷款类放款机构数：{{personal_loan_f.nllenders}}</el-col>
        <el-col :span="6" class="mgtop"  :class="textcolor(personal_loan_f.repay_fail1,3)">近1个月还款失败次数：{{personal_loan_f.repay_fail1}}</el-col>
        <el-col :span="6" class="mgtop" :class="textcolor(personal_loan_f.repay_fail12,3)">近12个月还款失败次数：{{personal_loan_f.repay_fail12}}</el-col>
        <el-col :span="6" class="mgtop">近1个月还款成功次数：{{personal_loan_f.repay_succ1}}</el-col>
        <el-col :span="6" class="mgtop">近12个月还款成功次数：{{personal_loan_f.repay_succ12}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 贷款申请信息 -->
    <div  class="box">
      <span class="l_title">贷款申请信息</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6">近12个月申请机构总数：{{personal_loan_s.apply_mechanism_number}}</el-col>
        <el-col :span="6">近1个月申请次数：{{personal_loan_s.apply_time1}}</el-col>
        <el-col :span="6">近3个月申请次数：{{personal_loan_s.apply_time3}}</el-col>
        <el-col :span="6">近6个月申请次数：{{personal_loan_s.apply_time6}}</el-col>
        <el-col :span="6" class="mgtop">消费分期类申请机构数：{{personal_loan_s.consumer_apply_mechanism_number}}</el-col>
        <el-col :span="6" class="mgtop">距离最近一次申请日期的天数：{{personal_loan_s.distance_now_days}}</el-col>
        <el-col :span="6" class="mgtop">最近一次申请日期：{{personal_loan_s.last_apply_time}}</el-col>
        <el-col :span="6" class="mgtop">网络贷款类申请机构数：{{personal_loan_s.network_loan_apply_mechanis_mnumber}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 历史逾期记录 -->
    <div  class="box">
      <span class="l_title">历史逾期记录</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6" :class="textcolor(overdue.overdue_mechanism_number,2)">近6个月逾期机构总数：{{overdue.overdue_mechanism_number}}</el-col>
        <el-col :span="6" :class="textcolor(overdue.counts,2)">近6个月逾期总次数：{{overdue.counts}}</el-col>
        <el-col :span="6" :class="textcolor(overdue.overdue_money,2)">近6个月逾期总金额(元)：{{overdue.overdue_money}}</el-col>
        <el-col :span="6" :class="textcolor(overdue.uncleared_counts,2)">近6个月未结清逾期次数：{{overdue.uncleared_counts}}</el-col>
      </el-row>
      <el-row  class="infolist infolist_top" v-for="(item,index) in overdue.datalist">
        <el-col :span="6">逾期天数：{{item.overdue_day}}</el-col>
        <el-col :span="6">逾期金额：{{item.overdue_money}}</el-col>
        <el-col :span="6">逾期时间：{{item.overdue_time}}</el-col>
        <el-col :span="6">是否结清：{{item.settlement}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 关联风险监测 -->
    <div  class="box">
      <span class="l_title">关联风险监测</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6" :class="textcolor(relevance.m3_idcard_to_phone_time,3)">3个月身份证关联手机号次数：{{relevance.m3_idcard_to_phone_time}}</el-col>
        <el-col :span="6" :class="textcolor(relevance.m3_phone_to_idcard_time,3)">3个月手机号关联身份证次数：{{relevance.m3_phone_to_idcard_time}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    <!-- 新版借贷2.0 -->
    <div  class="box">
      <span class="l_title">新版多头借贷2.0报告</span>
      <el-row  class="infolist infolist_top">
        <el-col :span="6" class="mgtop" v-for="(item,index) in jd"  :class="textcolor(item.value,item.lab)">{{item.title}}：{{item.value}}</el-col>
      </el-row>
    </div>
    <el-divider></el-divider>
    
  </div>
</template>

<script>
  import {
    getBoolData
  } from '@/api/order'
  export default {
    data() {
      return {
        person:'',
        triple:{

        },
        jd:{
          apply_by_id_d7_num:{title:"身份证号申请最近7天总次数",value:""},
          apply_by_id_m1_num:{title:"身份证号申请最近1个月总次数",value:""},
          apply_by_id_m3_num:{title:"身份证号申请最近3个月总次数",value:""},
          apply_by_id_m6_num:{title:"身份证号申请最近6个月天总次数",value:""},
          apply_by_phone_d7_num:{title:"手机号申请最近7天总次数",value:""},
          apply_by_phone_m1_num:{title:"手机号申请最近1个月总次数",value:""},
          apply_by_phone_m3_num:{title:"手机号申请最近3个月总次数",value:""},
          apply_by_phone_m6_num:{title:"手机号申请最近6个月天总次数",value:""},
          apply_org_by_id_d7_num:{title:"身份证号申请最近7天总平台数",value:""},
          apply_org_by_id_m1_num:{title:"身份证号申请最近1个月总平台数",value:""},
          apply_org_by_id_m3_num:{title:"身份证号申请最近3个月总平台数",value:""},
          apply_org_by_id_m6_num:{title:"身份证号申请最近6个月天总平台数",value:""},
          apply_org_by_phone_d7_num:{title:"手机号申请最近7天总平台数",value:""},
          apply_org_by_phone_m1_num:{title:"手机号申请最近1个月总平台数",value:""},
          apply_org_by_phone_m3_num:{title:"手机号申请最近3个月总平台数",value:""},
          apply_org_by_phone_m6_num:{title:"手机号申请最近6个月天总平台数",value:""},
          debt_first_distance_now:{title:"首次负债距今时长 ",value:""},
          debt_org_d7_num:{title:"最近7天负债机构数 ",value:""},
          debt_org_m1_num:{title:"最近1个月负债机构数 ",value:""},
          debt_org_m3_num:{title:"最近3个月负债机构数 ",value:""},
          debt_org_m6_num:{title:"最近6个月负债机构数 ",value:""},
          debt_org_total_num:{title:"负债机构总数 ",value:""},
          debt_settled_num:{title:"已结清负债机构数 ",value:""},
          debt_shopping_total_num:{title:"消费金融类机构数 ",value:""},
          debt_www_total_num:{title:"网络贷款类机构数 ",value:""},
          ovdure_flag:{title:"是否存在逾期未结清;",value:"",lab:1},
          ovdure_org_money:{title:"当前逾期金额 ",value:""},
          ovdure_org_num:{title:"当前逾期机构数 ",value:""},
          repay_fail_d7_money:{title:"最近7天还款失败金额 ",value:"",lab:1},
          repay_fail_d7_num:{title:"最近7天还款失败次数 ",value:"",lab:1},
          repay_fail_m1_money:{title:"最近1个月还款失败金额 ",value:"",lab:1},
          repay_fail_m1_num:{title:"最近1个月还款失败次数 ",value:"",lab:1},
          repay_fail_m3_money:{title:"最近3个月还款失败金额 ",value:"",lab:1},
          repay_fail_m3_num:{title:"最近3个月还款失败次数 ",value:"",lab:1},
          repay_fail_m6_money:{title:"最近6个月还款失败金额 ",value:"",lab:1},
          repay_fail_m6_num:{title:"最近6个月还款失败次数 ",value:"",lab:1},
          repay_succ_d7_money:{title:"最近7天还款成功金额 ",value:""},
          repay_succ_d7_num:{title:"最近7天还款成功次数 ",value:""},
          repay_succ_m1_money:{title:"最近1个月还款成功金额 ",value:""},
          repay_succ_m1_num:{title:"最近3个月还款成功次数 ",value:""},
          repay_succ_m3_money:{title:"最近3个月还款成功金额 ",value:""},
          repay_succ_m3_num:{title:"最近6个月还款成功次数 ",value:""},
          repay_succ_m6_money:{title:"最近6个月还款成功金额 ",value:""},
          repay_succ_m6_num:{title:"最近6个月还还款成功次数 ",value:""},
          repay_succ_lately_num:{title:"最近一次成功还款距今天数 ",value:""},
        },
        base: {
          "age": 0,
          "id_card_city": "",
          "ident_number": "",
          "mobile_address_city": "",
          "name": "",
          "phone": ""
        },
        court_risk_info_list:[],
        personal_loan_demand: {
          "wx_datad7": {
            "common_amortize_platform": 1,
            "credit_card": 0,
            "large_finance_platform": 0,
            "other_platform": 1,
            "p2p_platform": 0,
            "petty_loan_platform": 0,
            "platform_total": 2
          },
          "wx_datam1": {
            "common_amortize_platform": 1,
            "credit_card": 0,
            "large_finance_platform": 0,
            "other_platform": 3,
            "p2p_platform": 0,
            "petty_loan_platform": 0,
            "platform_total": 4
          },
          "wx_datam3": {
            "common_amortize_platform": 4,
            "credit_card": 0,
            "large_finance_platform": 4,
            "other_platform": 4,
            "p2p_platform": 4,
            "petty_loan_platform": 2,
            "platform_total": 18
          }
        },
        personal_loan_f: {
          "cflenders": "无记录",
          "distance_now_days": "无记录",
          "lend_number1": "无记录",
          "lend_number3": "无记录",
          "lend_number6": "无记录",
          "lend_time": "无记录",
          "lenders": "无记录",
          "loanday": "无记录",
          "nllenders": "无记录",
          "repay_fail1": "无记录",
          "repay_fail12": "无记录",
          "repay_succ1": "无记录",
          "repay_succ12": "无记录",
          "type": "N"
        },
        personal_loan_s: {
          "apply_mechanism_number": "3",
          "apply_time1": "0",
          "apply_time12": "4",
          "apply_time3": "3",
          "apply_time6": "3",
          "consumer_apply_mechanism_number": "0",
          "distance_now_days": 64,
          "last_apply_time": "2019-04",
          "network_loan_apply_mechanis_mnumber": "1",
          "type": "Y"
        },
        overdue: {
          "data_list": [],
          "overdue_mechanism_number": "",
          "overdue_total_counts": "",
          "overdue_total_money": "",
          "type": "N",
          "uncleared_counts": "",
          "yuqi_boolean": false
        },
        relevance: {
          ident_to_phone_counts: '',
          phone_to_ident_counts: ''
        },
        risk_list_check: {
          "car_rental_break_contract_list": "未命中",
          "census_register_hign_risk_area": "未命中",
          "court_break_faith_list": "未命中",
          "court_case_list": "未命中",
          "court_execute_list": "未命中",
          "credit_overdue_list": "未命中",
          "crime_manhunt_list": "未命中",
          "hign_risk_focus_list": "未命中",
          "owing_taxes_legal_person_list": "未命中",
          "owing_taxes_list": "未命中",
          "personal_fraud_blacklist": "未命中",
          "riding_break_contract_list": "未命中",
          "small_number_base": "未命中",
          "student_loan_arrearage_list": "未命中",
          "virtual_number_base": "未命中"
        },
        detail: {}
      }
    },
    created() {
      let order_id = this.$route.params.order_id;
      this.getBoolData(order_id)
    },
    methods: {
      getBoolData(order_id) {
        getBoolData(order_id).then(resp => {
          this.base = resp.data.main.resp_data.base_info
          this.overdue = resp.data.main.resp_data.personal_overdue_history
          this.relevance = resp.data.main.resp_data.relevance_risk_check
          this.risk_list_check = resp.data.main.resp_data.risk_list_check
          this.personal_loan_s = resp.data.main.resp_data.personal_loan_s
          this.personal_loan_f = resp.data.main.resp_data.personal_loan_f
          this.personal_loan_demand = resp.data.main.resp_data.personal_loan_demand
          this.court_risk_info_list=resp.data.main.resp_data.court_risk_info_list
          let jd_data = resp.data.jd.resp_data
         // console.log(resp.data.resp_data.court_risk_info_list);
          this.detail = resp.data.main.resp_data
          this.person = resp.data.person.resp_data.result_code
          this.triple = resp.data.triple.resp_data
          for(let i in jd_data){
            this.jd[i].value = jd_data[i];
          }
        })
      },
      textcolor(t,lab){
          if(lab==1&&t!=0){
            return 'red'
          }
          if(lab==2&&t!=0){
            return 'red'
          }
          if(lab==3&&(t!=0&&t!='无记录')){
            return 'red'
          }
          
      }
    }
  }
</script>

<style>
.app-container{font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;}
.box{margin-left:50px;margin-right: 50px;}
.toinfo{text-align: right;}
.infolist_top{margin-top:12px;}
.infolist{color:#333;font-size:14px;margin-left: 10px;}
.infolist_file{color:#1890FF;font-size:15px;margin-left: 10px;}
.mgtop{margin-top:12px}
.el-divider--horizontal{margin:12px 0;}
.l_title{font-size:14px;color:#111;font-weight: 600;}
.grid-content{border:none}
.red{color:red}
</style>
